package com.pm.store.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.pm.entity.Goods;
import com.pm.store.biz.GoodsBiz;

@Controller
@RequestMapping("/good")
public class GoodsController {
	@Resource
	private GoodsBiz goodsBiz;
	
	@RequestMapping("/list")
	public String list(Model model){
		List<Goods> list= goodsBiz.findAll();
		model.addAttribute("list", list);
		return "/Good/shop";
	}
}
